#ifndef __UWIFI_H__
#define __UWIFI_H__

#include "config.h"

#define linkNetworkMax (30)
#define linkMqttSerMax (5)

typedef struct
{
  bool finish;
  String topics;
  String content;
} received_subcribe_t;

void setup_wifi(void);
void loop_wifi(void);
void wifi_ScanAP(void);
void wifi_Connect(void);
void wifi_Status(void);

void web_ShowHtml(void);
void web_HandleIndex_Html(void);
void web_HandleConfig_Html(void);
void web_HandleConnect_Html(void);
void web_HandlePublic_Html(void);
void web_HandleSubcribe_Html(void);
void web_HandleConfig(void);
void web_HandleConnect(void);
void web_HandlePublic(void);
void web_HandleSubcribe(void);
void web_HandleCancelSub(void);
void web_HandleContext(void);
void web_HandleInfomation(void);
void web_HandleNotFound(void);

void mqtt_Connect(void);
void mqtt_Loop(void);
void mqtt_Callback(char *topic, byte *payload, unsigned int length);

#endif /* __UWIFI_H__ */